
<?php 

/*
* Bootstrap
*/


/*
* get controller name
*/
$actionBaseName = Request::GetAction();
/*
* get action name
*/
$controllerBaseName = Request::GetController();

/*
* create action functio name  
*/
$actionName = $actionBaseName.'Action';
/*
* create controller class name
*/
$controllerName = $controllerBaseName.'Controller';

/*
* create instance of controller
*/
$controllerInstance = new $controllerName($controllerBaseName,$actionBaseName);

/*
* run action
*/
if(method_exists($controllerInstance,$actionName))
	$controllerInstance->$actionName();
else 
	die("Wrong method name!");
 
?>
